<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta name="description" content="">
    <meta name="author" content="Mosaddek">
    <meta name="keyword" content="FlatLab, Dashboard, Bootstrap, Admin, Template, Theme, Responsive, Fluid, Retina">
    <link rel="shortcut icon" href="__PUBLIC__/img/favicon.png">

    <title>南牧物联网云平台</title>

    <!-- Bootstrap core CSS -->
    <link href="__PUBLIC__/css/bootstrap.min.css" rel="stylesheet">
    <link href="__PUBLIC__/css/bootstrap-reset.css" rel="stylesheet">
    <!--external css-->
    <link href="__PUBLIC__/assets/font-awesome/css/font-awesome.css" rel="stylesheet" />
	<link href="__PUBLIC__/assets/morris.js-0.4.3/morris.css" rel="stylesheet" />
    <link href="__PUBLIC__/assets/jquery-easy-pie-chart/jquery.easy-pie-chart.css" rel="stylesheet" type="text/css" media="screen"/>
    <link rel="stylesheet" href="__PUBLIC__/css/owl.carousel.css" type="text/css">

      <!--right slidebar-->
      <link href="__PUBLIC__/css/slidebars.css" rel="stylesheet">

    <!-- Custom styles for this template -->

    <link href="__PUBLIC__/css/style.css" rel="stylesheet">
	<link href="__PUBLIC__/css/app.css" rel="stylesheet">
    <link href="__PUBLIC__/css/style-responsive.css" rel="stylesheet" />
  </head>

  <body>
		
			  

		<div class="row">
			<!-- <div class="col-lg-2 col-md-2">
			    <section class="panel">
				    <div class="list-group">
						<div class="mybar">
							<foreach name="houselist" item="vo" key="k">
							<a class="list-group-item" id="id-house-{$vo.rid}" href="javascript:;" onclick="loadDevice('{$vo.rid}')"><i class="fa fa-home"></i>  {$vo.housename}</a>
							</foreach>
						</div>
				    </div>
			    </section>
		    </div> -->
			
			<div class="col-lg-9 col-md-9">
			
				<div class="row">
					<div class="col-lg-12">
						<ul class="breadcrumb">
							<li><a href="#" onclick="parent.document.getElementById('id-a-Index-home').click();"> <i class="fa fa-home"></i>栏舍状态</a></li>
							<li class="active">{$housemodel['housename']}</li>
						</ul>
					</div>
				</div>
				
				<div class="mybar">
					<div class="row">
						<div class="col-lg-7 col-md-7 col-sm-7">
							<div class="row">
								
								<embed id="PreviewActiveX" type="application/x-vlc-plugin" width="499px" height="300px"  target="rtsp://admin:debug123456@192.168.2.88:554/h264/ch1/main/av_stream" autoplay="yes" controller="true" loop="no" volume="50" toolbar="true">
								
							</div>
						</div>
						
						<div class="col-lg-5 col-md-5 col-sm-5">
							
							<div class="row">
								<div class="col-lg-12 text-center">
									<div class="r bg-light dker item hbox no-border">

									  <div class="col dk padder-v r-r">
										<div class="text-primary-dk font-thin h1"><span id='id-day'>{$nm820410status.day}</span></div>
										<span class="text-muted text-base">当前天龄</span>
									  </div>
									</div>
								</div>
							</div>
							
							<div class="row">
								<div class="col-lg-6 col-md-6 col-sm-6 text-center">
									<div class="panel padder-v item">
									  <div class="text-info font-thin h2"><span id='id-humi_r1'>{$nm820410status.humi_r1}</span><h4 class="inline">&nbsp;%Rh</h4></div>
									  <span class="text-muted text-base">舍内湿度</span>
									  <div class="top text-right w-full">
										<i class="fa fa-caret-down text-warning m-r-sm"></i>
									  </div>
									</div>
								</div>
							
								<div class="col-lg-6 col-md-6 col-sm-6 text-center">
									<div class="panel padder-v item">
									  <div class="text-info font-thin h2"><span id='id-temp_avg'>{$nm820410status.temp_avg}</span><h4 class="inline">&nbsp;℃</h4></div>
									  <span class="text-muted text-base">舍内温度</span>
									  <div class="top text-right w-full">
										<i class="fa fa-caret-down text-warning m-r-sm"></i>
									  </div>
									</div>
								</div>
							</div>
							
							<div class="row">
								<div class="col-lg-6 col-md-6 col-sm-6 text-center">
									<div class="panel padder-v item">
									  <div class="text-info font-thin h2"><span id='id-nh3_r'>{$nm820410status.nh3_r}</span><h4 class="inline">&nbsp;ppm</h4></div>
									  <span class="text-muted text-base">氨气浓度</span>
									  <div class="top text-right w-full">
										<i class="fa fa-caret-down text-warning m-r-sm"></i>
									  </div>
									</div>
								</div>
								
								<div class="col-lg-6 col-md-6 col-sm-6 text-center">
									<div class="panel padder-v item">
									  <div class="text-info font-thin h2"><span id='id-light_r'>{$nm820410status.light_r}</span><h4 class="inline">&nbsp;Lux</h4></div>
									  <span class="text-muted text-base">光照强度</span>
									  <div class="top text-right w-full">
										<i class="fa fa-caret-down text-warning m-r-sm"></i>
									  </div>
									</div>
								</div>
							</div>
						</div>
					</div>
					
					<div class="row">
						<div class="col-lg-12">
							
								<div class="row">
									<div class="col-xs-3">
										<div class="row">
											<div class="col-xs-6">
												<if condition="$nm820410status['fan1'] eq '0'">
												<a href="javascript:;" id='id-fan1' class="block panel padder-v bg-black-opacity item text-center">
												<else />
												<a href="javascript:;" id='id-fan1' class="block panel padder-v bg-info item text-center">
												</if>
												  <span class="text-white font-thin h1 block"><i class="fa fa-asterisk"></i></span>
												  <span class="text-muted text-base">风机1</span>
												</a>
											</div>
											
											<div class="col-xs-6">
												<if condition="$nm820410status['fan2'] eq '0'">
												<a href="javascript:;" id='id-fan2' class="block panel padder-v bg-black-opacity item text-center">
												<else />
												<a href="javascript:;" id='id-fan2' class="block panel padder-v bg-info item text-center">
												</if>
												  <span class="text-white font-thin h1 block"><i class="fa fa-asterisk"></i></span>
												  <span class="text-muted text-base">风机2</span>
												</a>
											</div>
										</div>
									</div>

									<div class="col-xs-3">
										<div class="row">
											<div class="col-xs-6">
												<if condition="$nm820410status['fan3'] eq '0'">
												<a href="javascript:;" id='id-fan3' class="block panel padder-v bg-black-opacity item text-center">
												<else />
												<a href="javascript:;" id='id-fan3' class="block panel padder-v bg-info item text-center">
												</if>
												  <span class="text-white font-thin h1 block"><i class="fa fa-asterisk"></i></span>
												  <span class="text-muted text-base">风机3</span>
												</a>
											</div>
											
											<div class="col-xs-6">
												<if condition="$nm820410status['fan4'] eq '0'">
												<a href="javascript:;" id='id-fan4' class="block panel padder-v bg-black-opacity item text-center">
												<else />
												<a href="javascript:;" id='id-fan4' class="block panel padder-v bg-info item text-center">
												</if>
												  <span class="text-white font-thin h1 block"><i class="fa fa-asterisk"></i></span>
												  <span class="text-muted text-base">风机4</span>
												</a>
											</div>
										</div>
									</div>
									<div class="col-xs-3">
										<div class="row">
											<div class="col-xs-6">
												<if condition="$nm820410status['fan5'] eq '0'">
												<a href="javascript:;" id='id-fan5' class="block panel padder-v bg-black-opacity item text-center">
												<else />
												<a href="javascript:;" id='id-fan5' class="block panel padder-v bg-info item text-center">
												</if>
												  <span class="text-white font-thin h1 block"><i class="fa fa-asterisk"></i></span>
												  <span class="text-muted text-base">风机5</span>
												</a>
											</div>
											
											<div class="col-xs-6">
												<if condition="$nm820410status['fan6'] eq '0'">
												<a href="javascript:;" id='id-fan6' class="block panel padder-v bg-black-opacity item text-center">
												<else />
												<a href="javascript:;" id='id-fan6' class="block panel padder-v bg-info item text-center">
												</if>
												  <span class="text-white font-thin h1 block"><i class="fa fa-asterisk"></i></span>
												  <span class="text-muted text-base">风机6</span>
												</a>
											</div>
										</div>
									</div>
									<div class="col-xs-3">
										<div class="row">
											<div class="col-xs-6">
												<if condition="$nm820410status['fan7'] eq '0'">
												<a href="javascript:;" id='id-fan7' class="block panel padder-v bg-black-opacity item text-center">
												<else />
												<a href="javascript:;" id='id-fan7' class="block panel padder-v bg-info item text-center">
												</if>
												  <span class="text-white font-thin h1 block"><i class="fa fa-asterisk"></i></span>
												  <span class="text-muted text-base">风机7</span>
												</a>
											</div>
											
											<div class="col-xs-6">
												<if condition="$nm820410status['fan8'] eq '0'">
												<a href="javascript:;" id='id-fan8' class="block panel padder-v bg-black-opacity item text-center">
												<else />
												<a href="javascript:;" id='id-fan8' class="block panel padder-v bg-info item text-center">
												</if>
												  <span class="text-white font-thin h1 block"><i class="fa fa-asterisk"></i></span>
												  <span class="text-muted text-base">风机8</span>
												</a>
											</div>
										</div>
									</div>
								</div>
								
								<if condition="$nm820410status['fancount'] eq '16'">
								<div class="row">
									<div class="col-xs-3">
										<div class="row">
											<div class="col-xs-6">
												<if condition="$nm820410status['fan9'] eq '0'">
												<a href="javascript:;" id='id-fan9' class="block panel padder-v bg-black-opacity item text-center">
												<else />
												<a href="javascript:;" id='id-fan9' class="block panel padder-v bg-info item text-center">
												</if>
												  <span class="text-white font-thin h1 block"><i class="fa fa-asterisk"></i></span>
												  <span class="text-muted text-base">风机9</span>
												</a>
											</div>
											
											<div class="col-xs-6">
												<if condition="$nm820410status['fan10'] eq '0'">
												<a href="javascript:;" id='id-fan10' class="block panel padder-v bg-black-opacity item text-center">
												<else />
												<a href="javascript:;" id='id-fan10' class="block panel padder-v bg-info item text-center">
												</if>
												  <span class="text-white font-thin h1 block"><i class="fa fa-asterisk"></i></span>
												  <span class="text-muted text-base">风机10</span>
												</a>
											</div>
										</div>
									</div>

									<div class="col-xs-3">
										<div class="row">
											<div class="col-xs-6">
												<if condition="$nm820410status['fan11'] eq '0'">
												<a href="javascript:;" id='id-fan11' class="block panel padder-v bg-black-opacity item text-center">
												<else />
												<a href="javascript:;" id='id-fan11' class="block panel padder-v bg-info item text-center">
												</if>
												  <span class="text-white font-thin h1 block"><i class="fa fa-asterisk"></i></span>
												  <span class="text-muted text-base">风机11</span>
												</a>
											</div>
											
											<div class="col-xs-6">
												<if condition="$nm820410status['fan12'] eq '0'">
												<a href="javascript:;" id='id-fan12' class="block panel padder-v bg-black-opacity item text-center">
												<else />
												<a href="javascript:;" id='id-fan12' class="block panel padder-v bg-info item text-center">
												</if>
												  <span class="text-white font-thin h1 block"><i class="fa fa-asterisk"></i></span>
												  <span class="text-muted text-base">风机12</span>
												</a>
											</div>
										</div>
									</div>
									<div class="col-xs-3">
										<div class="row">
											<div class="col-xs-6">
												<if condition="$nm820410status['fan13'] eq '0'">
												<a href="javascript:;" id='id-fan13' class="block panel padder-v bg-black-opacity item text-center">
												<else />
												<a href="javascript:;" id='id-fan13' class="block panel padder-v bg-info item text-center">
												</if>
												  <span class="text-white font-thin h1 block"><i class="fa fa-asterisk"></i></span>
												  <span class="text-muted text-base">风机13</span>
												</a>
											</div>
											
											<div class="col-xs-6">
												<if condition="$nm820410status['fan14'] eq '0'">
												<a href="javascript:;" id='id-fan14' class="block panel padder-v bg-black-opacity item text-center">
												<else />
												<a href="javascript:;" id='id-fan14' class="block panel padder-v bg-info item text-center">
												</if>
												  <span class="text-white font-thin h1 block"><i class="fa fa-asterisk"></i></span>
												  <span class="text-muted text-base">风机14</span>
												</a>
											</div>
										</div>
									</div>
									<div class="col-xs-3">
										<div class="row">
											<div class="col-xs-6">
												<if condition="$nm820410status['fan15'] eq '0'">
												<a href="javascript:;" id='id-fan15' class="block panel padder-v bg-black-opacity item text-center">
												<else />
												<a href="javascript:;" id='id-fan15' class="block panel padder-v bg-info item text-center">
												</if>
												  <span class="text-white font-thin h1 block"><i class="fa fa-asterisk"></i></span>
												  <span class="text-muted text-base">风机15</span>
												</a>
											</div>
											
											<div class="col-xs-6">
												<if condition="$nm820410status['fan16'] eq '0'">
												<a href="javascript:;" id='id-fan16' class="block panel padder-v bg-black-opacity item text-center">
												<else />
												<a href="javascript:;" id='id-fan16' class="block panel padder-v bg-info item text-center">
												</if>
												  <span class="text-white font-thin h1 block"><i class="fa fa-asterisk"></i></span>
												  <span class="text-muted text-base">风机16</span>
												</a>
											</div>
										</div>
									</div>
								</div>
								</if>
								
								
								
								<div class="row">
									<div class="col-lg-4 col-md-4">
									  <div class="panel">
										  <div class="panel-body">
											  <div class="bio-chart">
												  <input id='id-pc_sidewin' class="knob" data-width="60" data-height="60" data-displayPrevious=true  data-thickness=".2" value="{$nm820410status.pc_sidewin}" data-fgColor="#4CC5CD" data-bgColor="#e8e8e8">
											  </div>
											  <div class="bio-desk">
												  <h4 class="terques">侧风窗开启比例</h4>
											  </div>
										  </div>
									  </div>
									</div>
									
									<div class="col-lg-4 col-md-4">
									  <div class="panel">
										  <div class="panel-body">
											  <div class="bio-chart">
												  <input id='id-pc_topwin' class="knob" data-width="60" data-height="60" data-displayPrevious=true  data-thickness=".2" value="{$nm820410status.pc_topwin}" data-fgColor="#4CC5CD" data-bgColor="#e8e8e8">
											  </div>
											  <div class="bio-desk">
												  <h4 class="terques">天花窗开启比例</h4>
											  </div>
										  </div>
									  </div>
									</div>
									
									<div class="col-lg-4 col-md-4">
									  <div class="panel">
										  <div class="panel-body">
											  <div class="bio-chart">
												  <input id='id-pc_roller' class="knob" data-width="60" data-height="60" data-displayPrevious=true  data-thickness=".2" value="{$nm820410status.pc_roller}" data-fgColor="#4CC5CD" data-bgColor="#e8e8e8">
											  </div>
											  <div class="bio-desk">
												  <h4 class="terques">卷帘开启比例 </h4>
											  </div>
										  </div>
									  </div>
									</div>
								</div>
								<div class="row">
									<div class="col-lg-4 col-md-4">
									  <div class="panel">
										  <div class="panel-body">
											  <div class="bio-chart">
												  <input id='id-pc_slide' class="knob" data-width="60" data-height="60" data-displayPrevious=true  data-thickness=".2" value="{$nm820410status.pc_slide}" data-fgColor="#4CC5CD" data-bgColor="#e8e8e8">
											  </div>
											  <div class="bio-desk">
												  <h4 class="terques">滑帘开启比例</h4>
											  </div>
										  </div>
									  </div>
									</div>
									
									<div class="col-lg-4 col-md-4">
									  <div class="panel">
										  <div class="panel-body">
											  <div class="bio-chart">
												  <input id='id-pc_wind' class="knob" data-width="60" data-height="60" data-displayPrevious=true  data-thickness=".2" value="{$nm820410status.pc_wind}" data-fgColor="#4CC5CD" data-bgColor="#e8e8e8">
											  </div>
											  <div class="bio-desk">
												  <h4 class="terques">变频风机开启比例</h4>
											  </div>
										  </div>
									  </div>
									</div>
									
									<div class="col-lg-4 col-md-4">
									  <div class="panel">
										  <div class="panel-body">
											  <div class="bio-chart">
												  <input id='id-pc_light' class="knob" data-width="60" data-height="60" data-displayPrevious=true  data-thickness=".2" value="{$nm820410status.pc_light}" data-fgColor="#4CC5CD" data-bgColor="#e8e8e8">
											  </div>
											  <div class="bio-desk">
												  <h4 class="terques">可调光照开启比例</h4>
											  </div>
										  </div>
									  </div>
									</div>
								</div>
							
						</div>
					</div>
				</div>
			</div>
			
			<div class="col-lg-3 col-md-3">
				
					<section class="panel" >
						<header class="panel-heading tab-bg-dark-navy-blue " >
						    <ul class="nav nav-tabs ">
							    <li class="active">
								    <a data-toggle="tab" href="#tab1">环控</a>
							    </li>
							    <li class="">
								    <a data-toggle="tab" href="#tab2">料线</a>
							    </li>
							    <li class="">
								    <a data-toggle="tab" href="#tab3">饲喂</a>
							    </li>
						    </ul>
						</header>
						
						<div class="mybar">
						
							<div class="panel-body" >
							
								<div class="tab-content">
								
									<div id="tab1" class="tab-pane active" >
										  <div class="panel panel-default ng-scope">
											<div class="list-group no-radius alt">
											  <span class="list-group-item text-md wrapper-xs text-center">{$nm820410status.device}环境控制器</span>
											  <if condition="$nm820410status['online'] eq '1'">
											  <span class="list-group-item text-success-dk">
												<!-- <a><i class="fa fa-gear fa-fw text-muted pull-right"></i></a> -->
												设备在线
											  </span>
											  <else /> 
											  <span class="list-group-item text-success-dk">
												<!-- <a><i class="fa fa-gear fa-fw text-muted pull-right"></i></a> -->
												设备离线
											  </span>
											  </if>
											  
											  <a class="list-group-item" href="javascript:;">
												<span class="label bg-light pull-right text-sm">
													<if condition="$nm820410status['type'] eq '0'">
													隧道通风
													<else /> 最小通风
													
													</if>
												</span>
												通风模式
											  </a>
											  <a class="list-group-item" href="javascript:;">
												<span class="badge bg-info  text-sm">{$nm820410status.level}</span>通风等级
											  </a>
											  <a class="list-group-item" href="javascript:;">
												<span class="text-success text-md pull-right">{$nm820410status.temp_target}℃</span>目标温度
											  </a>
											  <a class="list-group-item" href="javascript:;">
												<span class="text-success text-md pull-right">{$nm820410status.temp_r1}℃</span>温度传感器1
											  </a>
											  <a class="list-group-item" href="javascript:;">
												<span class="text-success text-md pull-right">{$nm820410status.temp_r2}℃</span>温度传感器2
											  </a>
											  <a class="list-group-item" href="javascript:;">
												<span class="text-success text-md pull-right">{$nm820410status.temp_r3}℃</span>温度传感器3
											  </a>
											  
											  <if condition="$nm820410status['device'] eq 'NM820'">
											  <a class="list-group-item" href="javascript:;">
												<span class="text-success text-md pull-right">{$nm820410status.temp_r4}℃</span>温度传感器4
											  </a>
											  <a class="list-group-item" href="javascript:;">
												<span class="text-success text-md pull-right">{$nm820410status.temp_r5}℃</span>温度传感器5
											  </a>
											  <a class="list-group-item" href="javascript:;">
												<span class="text-success text-md pull-right">{$nm820410status.temp_r6}℃</span>温度传感器6
											  </a>
											  </if>
											  
											  <a class="list-group-item" href="javascript:;">
												<if condition="$nm820410status['device'] eq 'NM820'">
												<span class="text-success text-md pull-right">{$nm820410status.temp_r7}℃</span>
												<else /> <span class="text-success text-md pull-right">{$nm820410status.temp_r4}℃</span>
												</if>
												<i class="glyphicon glyphicon-home m-r-xs text-muted"></i>舍外温度1
											  </a>
											  
											  <if condition="$nm820410status['device'] eq 'NM820'">
											  <a class="list-group-item" href="javascript:;">
												<span class="text-success text-md pull-right">{$nm820410status.temp_r8}℃</span>
												<i class="glyphicon glyphicon-home m-r-xs text-muted"></i>舍外温度2
											  </a>
											  </if>

											</div>
										  </div>
                
									</div>
									
									<div id="tab2" class="tab-pane" >
										
										<div class="list-group no-radius alt">
										  <span class="list-group-item text-md wrapper-xs text-center">料线控制器</span>
										  <if condition="$vnm3000statusModel['online'] eq '1'">
										  <span class="list-group-item text-success-dk">
											<!-- <a><i class="fa fa-gear fa-fw text-muted pull-right"></i></a> -->
											设备在线
										  </span>
										  <else /> 
										  <span class="list-group-item text-success-dk">
											<!-- <a><i class="fa fa-gear fa-fw text-muted pull-right"></i></a> -->
											设备离线
										  </span>
										  </if>
										  <a class="list-group-item" href="javascript:;">
											<span class="badge bg-info  text-sm">{$vnm3000statusModel.lxname}</span>名称
										  </a>
										  <a class="list-group-item" href="javascript:;">
											<span class="text-success text-md pull-right">{$vnm3000statusModel.slrun}</span>送料状态
										  </a>
										  <a class="list-group-item" href="javascript:;">
											<span class="text-success text-md pull-right">{$vnm3000statusModel.slmode}</span>送料模式
										  </a>
										  <a class="list-group-item" href="javascript:;">
											<span class="text-success text-md pull-right">{$vnm3000statusModel.slnextstart}</span>下次自动送料时间
										  </a>
										  <a class="list-group-item" href="javascript:;">
											<span class="text-success text-md pull-right">{$vnm3000statusModel.xlrun}</span>下料状态
										  </a>
										  <a class="list-group-item" href="javascript:;">
											<span class="text-success text-md pull-right">{$vnm3000statusModel.xlmode}</span>下料模式
										  </a>
										  <a class="list-group-item" href="javascript:;">
											<span class="text-success text-md pull-right">{$vnm3000statusModel.xlnextstart}</span>下次自动下料时间
										  </a>
										  <a class="list-group-item" href="javascript:;">
											<span class="text-success text-md pull-right">{$vnm3000statusModel.current}</span>塞链电机电流
										  </a>
										  <a class="list-group-item" href="javascript:;">
											<span class="text-success text-md pull-right">{$vnm3000statusModel.sw_full}</span>满料开关
										  </a>
										  <a class="list-group-item" href="javascript:;">
											<span class="text-success text-md pull-right">{$vnm3000statusModel.sw_emergent}</span>急停开关
										  </a>

										</div>
									</div>
									<div id="tab3" class="tab-pane" >
										<foreach name="vbw800statusList" item="vo" key="k">
										<section class="panel custom">
											  <div class="panel-body">
												  <!--<h1>New Dashboard BS3 </h1>-->
												  <div class="row p-details">
													  <div class="bio-row">
														  <p><span class="bold">名称 </span>: {$vo.lxname}</p>
													  </div>
													  <div class="bio-row">
														  <p><span class="bold">阶段 </span>: <span class="label label-primary">{$vo.stage}</span></p>
													  </div>
													  <div class="bio-row">
														  <p><span class="bold">第几日 </span>: {$vo.day}</p>
													  </div>
													  <div class="bio-row">
														  <p><span class="bold">今天总共可以吃多少克</span>: {$vo.total}</p>
													  </div>
													  <div class="bio-row">
														  <p><span class="bold">今天已经吃了多少克 </span>: {$vo.haseat}</p>
													  </div>
													  <div class="bio-row">
														  <p><span class="bold">模式 </span>: {$vo.mode}</p>
													  </div>
													  <div class="bio-row">
														  <p><span class="bold">下次喂料开始时间 </span>:{$vo.time_next_start}</p>
													  </div>
													  <div class="bio-row">
														  <p><span class="bold">下次喂料结束时间 </span>:{$vo.time_next_end}</p>
													  </div>
													  <div class="bio-row">
														  <p><span class="bold">下次喂料时间可以吃多少 </span>:{$vo.percent_next}</p>
													  </div>
													  <div class="bio-row">
														  <p><span class="bold">今天是否吃完 </span>:{$vo.state}</p>
													  </div>
													  <div class="bio-row">
														  <p><span class="bold">设备是否有故障报警 </span>:{$vo.alarm}</p>
													  </div>
												  </div>

											  </div>

										  </section>
										</foreach>
									</div>
								</div>
							</div>
						</div>
					</section>
				
			</div>
		</div>	


    <!-- js placed at the end of the document so the pages load faster -->
    <script src="__PUBLIC__/js/jquery.js"></script>
    <script src="__PUBLIC__/js/bootstrap.min.js"></script>
    <script class="include" type="text/javascript" src="__PUBLIC__/js/jquery.dcjqaccordion.2.7.js"></script>
    <script src="__PUBLIC__/js/jquery.scrollTo.min.js"></script>
    <script src="__PUBLIC__/js/jquery.nicescroll.js" type="text/javascript"></script>
	<!-- SlimScroll -->
	<script src="__PUBLIC__/plugins/slimScroll/jquery.slimscroll.min.js"></script>
	
    <script src="__PUBLIC__/js/jquery.sparkline.js" type="text/javascript"></script>
    <script src="__PUBLIC__/assets/jquery-easy-pie-chart/jquery.easy-pie-chart.js"></script>
    <script src="__PUBLIC__/js/owl.carousel.js" ></script>
    <script src="__PUBLIC__/js/jquery.customSelect.min.js" ></script>
	<script src="__PUBLIC__/assets/morris.js-0.4.3/morris.min.js" type="text/javascript"></script>
    <script src="__PUBLIC__/assets/morris.js-0.4.3/raphael-min.js" type="text/javascript"></script>
    <script src="__PUBLIC__/js/respond.min.js" ></script>

    <!--right slidebar-->
    <script src="__PUBLIC__/js/slidebars.min.js"></script>
	
	<!--Form Validation-->
    <script src="__PUBLIC__/js/bootstrap-validator.min.js" type="text/javascript"></script>

    <!--Form Wizard-->
    <script src="__PUBLIC__/js/jquery.steps.min.js" type="text/javascript"></script>
    <script src="__PUBLIC__/js/jquery.validate.min.js" type="text/javascript"></script>

    <!--common script for all pages-->
    <script src="__PUBLIC__/js/common-scripts.js"></script>

	<!-- 引入 echarts.js -->
    <script src="__PUBLIC__/assets/echart/echarts.js"></script>
	<script src="__PUBLIC__/assets/echart/macarons.js"></script>
	<script src="__PUBLIC__/assets/echart/china.js"></script>
	
    <!--script for this page-->
    <script src="__PUBLIC__/js/sparkline-chart.js"></script>
    <script src="__PUBLIC__/js/easy-pie-chart.js"></script>
	<script src="__PUBLIC__/js/count.js"></script>
	<script src="__PUBLIC__/js/echart.js"></script>

	<!--script for this page-->
    <script src="__PUBLIC__/js/jquery.stepy.js"></script>
	<!-- layer -->
	<script src="__PUBLIC__/plugins/layer-v3.0.1/layer/layer.js"></script>
	<script src="__PUBLIC__/assets/jquery-knob/js/jquery.knob.js"></script>
	

<script>

function refreshStatus(){

	$.ajax({
	  type: 'POST',
	  url: "{:u('Index/loadnm820410')}",
	  data: {rid:{$houseid}},
	  success: function(data){
		var htmlstr='';
		var list410=data.list410;
		var list820=data.list820;
		if(list820.length>0){
			var model=list820[0];
			$('#id-day').html(model.day);
			$('#id-humi_r1').html(model.humi_r1);
			$('#id-temp_avg').html(model.temp_avg);
			$('#id-nh3_r').html(model.nh3_r);
			$('#id-light_r').html(model.light_r);
			
			$('#id-pc_sidewin').val(model.pc_sidewin);
			$('#id-pc_topwin').val(model.pc_topwin);
			$('#id-pc_roller').val(model.pc_roller);
			$('#id-pc_slide').val(model.pc_slide);
			$('#id-pc_wind').val(model.pc_wind);
			$('#id-pc_light').val(model.pc_light);
			var relaystate=model.relaystate;
			var relaystate_bin=parseInt(relaystate).toString(2);
			//relaystate_bin=relaystate_bin.split("").reverse().join("");
			relaystate_bin=prefixInteger(relaystate_bin,17).toString();
			relaystate_bin=relaystate_bin.split("").reverse().join("");
			//console.info(relaystate_bin);
			for(var i=1;i<17;i++){
				if(relaystate_bin[i]=='0'){
					$('#id-fan'+i).attr("class","block panel padder-v bg-black-opacity item text-center");
				}else{
					$('#id-fan'+i).attr("class","block panel padder-v bg-info item text-center");
				}
			}
		}
		if(list410.length>0){
			var model=list410[0];
			$('#id-day').html(model.day);
			$('#id-humi_r1').html(model.humi_r1);
			$('#id-temp_avg').html(model.temp_avg);
			$('#id-nh3_r').html(model.nh3_r);
			$('#id-light_r').html(model.light_r);
			
			$('#id-pc_sidewin').val(model.pc_sidewin);
			$('#id-pc_topwin').val(model.pc_topwin);
			$('#id-pc_roller').val(model.pc_roller);
			$('#id-pc_slide').val(model.pc_slide);
			$('#id-pc_wind').val(model.pc_wind);
			$('#id-pc_light').val(model.pc_light);
			var relaystate=model.relaystate;
			var relaystate_bin=parseInt(relaystate).toString(2);
			//relaystate_bin=relaystate_bin.split("").reverse().join("");
			relaystate_bin=prefixInteger(relaystate_bin,17).toString();
			relaystate_bin=relaystate_bin.split("").reverse().join("");
			//console.info(relaystate_bin);
			for(var i=1;i<9;i++){
				if(relaystate_bin[i]=='0'){
					$('#id-fan'+i).attr("class","block panel padder-v bg-black-opacity item text-center");
				}else{
					$('#id-fan'+i).attr("class","block panel padder-v bg-info item text-center");
				}
			}
		}
	  },
	  error: function (data) {
		//alert(data);
	  },
	  complete: function (XHR, TS) {
		layer.closeAll('loading');
	  },
	  dataType: "json"
	});

	$.ajax({
	  type: 'POST',
	  url: "{:u('Index/loadbw800')}",
	  data: {rid:{$houseid}},
	  success: function(data){
		console.info(data);
	  },
	  error: function (data) {
		//alert(data);
	  },
	  complete: function (XHR, TS) {
		layer.closeAll('loading');
	  },
	  dataType: "json"
	});
	
	$.ajax({
	  type: 'POST',
	  url: "{:u('Index/loadbw800')}",
	  data: {rid:{$houseid}},
	  success: function(data){
		console.info(data);
	  },
	  error: function (data) {
		//alert(data);
	  },
	  complete: function (XHR, TS) {
		layer.closeAll('loading');
	  },
	  dataType: "json"
	});
	
	$.ajax({
	  type: 'POST',
	  url: "{:u('Index/loadnm3000')}",
	  data: {rid:{$houseid}},
	  success: function(data){
		console.info(data);
	  },
	  error: function (data) {
		alert(data);
	  },
	  complete: function (XHR, TS) {
		layer.closeAll('loading');
	  },
	  dataType: "json"
	});
}

function initScroll(){
	var h=$(window).height();
	//出现滚动条
	$(".mybar").slimScroll({
		height:(h-30),
		size: '10px', //组件宽度
		color: '#000', //滚动条颜色
		position: 'right', //组件位置：left/right
		distance: '0px', //组件与侧边之间的距离
		start: 'top', //默认滚动位置：top/bottom
		opacity: .5, //滚动条透明度
		alwaysVisible: false, //是否 始终显示组件
		disableFadeOut: false, //是否 鼠标经过可滚动区域时显示组件，离开时隐藏组件
		railVisible: true, //是否 显示轨道
		railColor: '#333', //轨道颜色
		railOpacity: .2, //轨道透明度
		railDraggable: true, //是否 滚动条可拖动
		railClass: 'slimScrollRail', //轨道div类名 
		barClass: 'slimScrollBar', //滚动条div类名
		wrapperClass: 'slimScrollDiv', //外包div类名
		allowPageScroll: true, //是否 使用滚轮到达顶端/底端时，滚动窗口
		wheelStep: 20, //滚轮滚动量
		touchScrollStep: 200, //滚动量当用户使用手势
		borderRadius: '7px', //滚动条圆角
		railBorderRadius: '7px' //轨道圆角
	});
}
$(window).resize(function(){
	initScroll();
	//
	var h=$(window).height();var w=$(window).width();
	$('#PreviewActiveX').attr("heigth",h/2);
	$('#PreviewActiveX').attr("width",(w-90)/2);
	console.info(h,w);
});
function prefixInteger(num, n) {
	return (Array(n).join(0) + num).slice(-n);
}
$(function(){
	initScroll();
	//var h=$(window).height();var w=$(window).width();
	//$('#PreviewActiveX').attr("heigth",h/2);
	//$('#PreviewActiveX').attr("width",w/2);
	//console.info(h,w);
	
	$(".knob").knob({'readOnly':true,"fgColor":"#4CC5CD","skin":"tron" });
	
	//启动定时加载
	setInterval(function () {
		refreshStatus();
	},1000*{$intval});
});


</script>

  </body>
</html>
